Skip to content

test(delivery): deflake TestUnreadableOwedMentionClearedNotReswept — gate on waitForOwed not post-drain owedCount (RIG-2920) - #718

Open
rigel-mintaka wants to merge 3 commits into
mainfrom
compass-comms/rig-2920-deflake-unreadable-owed
Open

test(delivery): deflake TestUnreadableOwedMentionClearedNotReswept — gate on waitForOwed not post-drain owedCount (RIG-2920)#718
rigel-mintaka wants to merge 3 commits into
mainfrom
compass-comms/rig-2920-deflake-unreadable-owed

Conversation

@rigel-mintaka

Copy link
Copy Markdown
Contributor

The unreadable-owed clear is a side-effect of the start-edge sweep, which
runs after waitStartsDrained returns (that helper only proves the edge was
dequeued, per introspect_test.go). Asserting owedCount==0 right after it
raced the async sweep and flaked red under CI load (owed rows = 1, want 0).

Gate on the existing waitForOwed(t, recipient, 0) barrier, which polls until
the clear lands and t.Fatalf's at the deadline otherwise — deterministic,
strictly stronger. Test-only; no production code touched.

Co-authored-by: Matt Wilkinson matt@rigel.build

…gate on waitForOwed not post-drain owedCount (RIG-2920)

The unreadable-owed clear is a side-effect of the start-edge sweep, which
runs after waitStartsDrained returns (that helper only proves the edge was
dequeued, per introspect_test.go). Asserting owedCount==0 right after it
raced the async sweep and flaked red under CI load (owed rows = 1, want 0).

Gate on the existing waitForOwed(t, recipient, 0) barrier, which polls until
the clear lands and t.Fatalf's at the deadline otherwise — deterministic,
strictly stronger. Test-only; no production code touched.

Co-authored-by: Matt Wilkinson <matt@rigel.build>
@linear-code

linear-code Bot commented Aug 28, 2026

Copy link
Copy Markdown

RIG-2920

@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown

Compass engineering docs preview: https://compass-comms-rig-2920-defla.compass-eng-docs.pages.dev

Deployed from compass-comms/rig-2920-deflake-unreadable-owed at cd4125f.

rigel-mintaka and others added 2 commits August 28, 2026 01:48
… site (RIG-2920)

Review low: the helper's doc scoped it to the nil-waker case, but the
deflake adds a caller where owed->0 is the sweep's clear side-effect with a
dispatcher present. Broaden the doc so it covers both call sites.

Co-authored-by: Matt Wilkinson <matt@rigel.build>
…RIG-2920)

Round-2 review low: the doc names two representative callers but the helper
has four (all the same record -> owed-row shape). Signal the list is an
example, not exhaustive; the leading general clause already covers all four.

Co-authored-by: Matt Wilkinson <matt@rigel.build>
@rigel-mintaka
rigel-mintaka marked this pull request as ready for review August 28, 2026 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant